<html>
 <head>
    {% comment %}
    <script src="{{ static_files }}/SHA256.js"></script>
    <script src="{{ static_files }}/prng4.js"></script>
    <script src="{{ static_files }}/rng.js"></script>
    <script src="{{ static_files }}/jsbn.js"></script>
    <script src="{{ static_files }}/jsbn2.js"></script>
    <script src="{{ static_files }}/srp.js"></script>
    {% endcomment %}
    <script src="{{ static_files }}/jsPacker/srp.min.js"></script>
    <script src="{{ static_files }}/jsPacker/srp_register.min.js"></script>
    <script type="text/javascript">
    function register()
    {
        if(document.getElementById("confirm_password").value != document.getElementById("srp_password").value)
            alert("Passwords do not match");
        else if(document.getElementById("srp_password").value == "")
            alert("Password cannot be blank");
        else
        {
            srp = new SRP();
            srp.success = function()
            {
                alert("We win");
            };
            srp.register();
        }
        return false;
    };
    </script>
 </head>
 <body>
    <form action="." onsubmit="return register()">
    <table>
    <tr><td>Username:</td><td><input type="text" id="srp_username" /></td></tr>
    <tr><td>Password:</td><td><input type="password" id="srp_password" /></td></tr>
    <tr><td>Confirm:</td><td><input type="password" id="confirm_password" /></td></tr>
    <input type="hidden" id="srp_url" value="{{ srp_url }}"/>
    <input type="hidden" id="srp_forward" value="{{ srp_url }}login/"/>
    <input type="hidden" id="srp_server" value="django"/>
    </table>
    <input type="submit"/>
    </form>
 </body>
</html>
